Semiconductor devices are desired to reduce power consumption. Further, semiconductor devices used in a system are desired to reduce power consumption by intentionally stopping power supply to constitutional elements, except for basic constitutional elements which need to operate in order to maintain the operation of the system. In order to realize the above-mentioned stop of power supply in the semiconductor device, when power is supplied again, elements including data holding circuits, which carry out data holding operations in normal circuitry operations, may be required to continue processing operations by using data held in the data holding circuits before the stop of the power supply.
In order to realize the above operations, data which is necessary to set the data holding circuits when the power is supplied again is temporarily stored in memory cells before the stop of the power supply, and the data holding circuits are set according to the stored data after the power is supplied again. These data holding circuits, which are set according to the stored data, are a part of constitutional elements to which the power supply is stopped. Thus, data set according to the stored data may be carried out to a part of many data holding circuits.
However, in the above constitution, the semiconductor device includes memory cells in addition to normal operational circuits having the constitutional elements. If the power supply to the memory cells is also stopped, the memory cells are required to be non-volatile. Further, when the power supply is stopped, an operation obtaining data in the data holding circuits and an operation storing the obtained data to the memory cells are sequentially carried out. Further, when the power is supplied again, an operation reading the stored data from the memory cells and an operation setting the read data to the data holding circuits are sequentially carried out.
Various memories have been known as non-volatile memory devices which hold data of when power supply to the devices is stopped, and integrated circuits in which MTJ (Magnetic Tunnel Junction) elements are formed have been known. In particular, non-volatile memories in which memory cells including MTJ elements are arranged at cross-points of a plurality of word lines and a plurality of bit lines have been proposed. However, these non-volatile memories including MTJ elements are memory devices which are used in place of NAND-type flash memories, etc.